package edu.ubb.scp.model;

import java.lang.reflect.Field;

public class Table implements Model {
	private int TableID;
	
	public Table(int tableID) {
		super();
		TableID = tableID;
	}
	
	public Table() {
		
	}

	public int getTableID() {
		return TableID;
	}

	public void setTableID(int tableID) {
		TableID = tableID;
	}

	@Override
	public String toString() {
		return "Table [TableID=" + TableID + "]";
	}
	
	@Override
	public Field getPrimaryKey() {
		try {
			return Table.class.getDeclaredField("TableID");
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	@Override
	public Field[] getKeys() {
		return new Field[] { getPrimaryKey() };
	}
}
